<!DOCTYPE html>
<html lang="en">

<head>

  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Flask</title>
  <link href="{{url_for('static', filename='components/bootstrap/css/bootstrap.min.css')}}" rel="stylesheet">
  <link href="{{url_for('static', filename='components/metisMenu/metisMenu.min.css')}}" rel="stylesheet">
  <link href="{{url_for('static', filename='css/sb-admin-2.css')}}" rel="stylesheet">
  <link href="{{url_for('static', filename='components/font-awesome/css/font-awesome.min.css')}}" rel="stylesheet">

  <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
  <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
  <!--[if lt IE 9]>
  <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
  <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
  <![endif]-->
</head>

<body>

  <div id="wrapper">
    <nav class="navbar navbar-default navbar-static-top" role="navigation" style="margin-bottom: 0">
      <div class="navbar-header">
        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
          <span class="sr-only">Toggle navigation</span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
        </button>
        <a class="navbar-brand" href="#">Flask</a>
      </div>
      <!-- /.navbar-header -->

      <ul class="nav navbar-top-links navbar-right">
        <!-- /.dropdown -->
        <li class="dropdown">
          <a class="dropdown-toggle" data-toggle="dropdown" href="#">
            {% if session.username %}
              {{session.username}}
            {% else %}
              admin
            {% endif %}
            <i class="fa fa-caret-down"></i>
          </a>
          <ul class="dropdown-menu dropdown-user">
            <li><a href="#"><i class="fa fa-gear fa-fw"></i> 设置</a>
            </li>
            <li class="divider"></li>
            <li><a href="/logout"><i class="fa fa-sign-out fa-fw"></i>退出</a>
            </li>
          </ul>
          <!-- /.dropdown-user -->
        </li>
        <!-- /.dropdown -->
      </ul>
      <!-- /.navbar-top-links -->

      <div class="navbar-default sidebar" role="navigation">
        <div class="sidebar-nav navbar-collapse">

          <ul class="nav" id="side-menu">
            <li>
              <a href="/user/list"> <i class="fa fa-th-list fa-fw"></i> 用户</a>
            </li>
          </ul>

        </div>
        <!-- /.sidebar-collapse -->
      </div>
      <!-- /.navbar-static-side -->
      </nav>
    <div id="page-wrapper">
      {% block body %}{% endblock %}
    </div>

  </div>
  <footer>
    <hr>
    <p class="text-center">
      Copyright © 2016 Flask All Rights Reserved.
    </p>
  </footer>

<script src="{{url_for('static', filename='js/jquery.min.js')}}"></script>
<script src="{{url_for('static', filename='components/bootstrap/js/bootstrap.min.js')}}"></script>
<script src="{{url_for('static', filename='components/metisMenu/metisMenu.min.js')}}"></script>
<script src="{{url_for('static', filename='js/sb-admin-2.js')}}"></script>

</body>

</html>
